<template>
    <div class="rotationChart">
        <Tabs type="card"
              v-model:value="currentTab"
              :animated="false">
            <TabPane icon="ios-list-box-outline" label="轮播图列表" name="chartList">
                <ChartList></ChartList>
            </TabPane>
            <TabPane icon="ios-add-circle-outline" label="新增轮播图" name="chartAdd">
                <ChartAdd @chart-add="chartAdd"></ChartAdd>
            </TabPane>
        </Tabs>
    </div>
</template>

<script>
    import ChartList from "@/components/chart/ChartList"
    import ChartAdd from "@/components/chart/ChartAdd"

    export default {
        name: "",
        components: {
            ChartList, ChartAdd
        },
        data() {
            return {
                currentTab: "chartList"
            }
        },
        methods: {
            chartAdd: function (data) {
                if (data == true) {
                    this.currentTab = "chartList"
                }
            }
        },
        mounted() {
        }
    }
</script>

<style scoped>

</style>